#include <boost/serialization/map.hpp>
#include <boost/serialization/string.hpp>
#include <boost/archive/binary_oarchive.hpp>
#include <fstream>
#include <map>

using namespace std;

typedef map<string, int> string_int_map;
map<string, string_int_map > m;

int main(){
  m.insert(make_pair("test",map<string,int>()));
  m["test"].insert(make_pair("test1",10));

  ofstream ofs("out.bin", ios::binary);
  {
    boost::archive::binary_oarchive oa(ofs);
    oa << m;
  }
    
  return 0;
}
